package com.probiz.estore.eai.product;

import com.probiz.estore.common.service.ProductService;
import com.probiz.estore.eai.common.GenericUnmarshaller;
import com.probiz.estore.eai.product.generated.InventorySet;

public class InventoryUnmarshaller extends GenericUnmarshaller<InventorySet>  {
	private ProductService productService;

	public void setProductService(ProductService productService) {
		this.productService = productService;
	}

	@Override
	public void startUnmarshal() throws Exception {
		InventorySet inventorySet = this.getEntitySet();
		productService.doImportProductsForEai(inventorySet.getInventory());
		
	}
	
//	@Override
//	protected String getTargetXmlFilePath(){
//		//得到eai.properties文件中相关的路径配置
//		return eaiUtil.getConfig( "inventoryClass.importXmlFile");
//	}
	
	
}
